from django.contrib import admin

from .models import ExcelFormat
from .models import ExcelData
from .models import ColumnFormat

# Register your models here.
class ColumnFormatInline(admin.TabularInline):
    model = ColumnFormat
    extra = 5


@admin.register(ExcelFormat)
class ExcelFormatAdmin(admin.ModelAdmin):
    inlines = [ColumnFormatInline, ]

    list_display = ('key', 'display', 'filter')  # list
    #search_fields = ('key',)

    #fieldsets = (
    #    ['Main', {'fields': ('key', ('display', 'filter')), }],
        #['Advance', {'classes': ('collapse',), 'fields': ('filter',), }]
    #)





#admin.site.register(ColumnFormat)
#admin.site.register(ExcelData)
#admin.site.register(ExcelFormat, ExcelFormatAdmin)
